const CryptoJS = require('crypto-js')
//DES 解密
function decryptByDES(ciphertext) {
    var keyHex = CryptoJS.enc.Utf8.parse("1qaz@wsx3e");
    //  ctpstp@custominfo!@#qweASD
    // direct decrypt ciphertext
    var decrypted = CryptoJS.DES.decrypt({
            ciphertext: CryptoJS.enc.Base64.parse(ciphertext),
        },
        keyHex, {
            mode: CryptoJS.mode.ECB,
            padding: CryptoJS.pad.Pkcs7,
        }
    );
    return JSON.parse(decrypted.toString(CryptoJS.enc.Utf8))
}